<template>
  <div class="reCharge_page">
    <van-nav-bar title="充值" left-arrow @click-left="$router.go('-1')" left-text="返回" />

    <div class="title">
      资本充值请联系集团股份负责人，联系电话：{{phone}}。微信、支付宝同号。
    </div>
    <van-row style="margin: 16px 16px 50px 16px" type="flex" justify="space-between">
      <van-col span="11">
        <van-button
          round
          block
          type="primary"
          @click="phoneContact(phone)"
        >拨打电话</van-button>
      </van-col>
      <van-col span="11">
        <van-button round block type="info" @click="doCopy">复制手机号</van-button>
      </van-col>
    </van-row>
  </div>
</template>

<script>
// let scan = null;
import {Toast} from "vant";

export default {
  name: 'reCharge',
  data() {
    return {
      smtype: true,
      phone: '13790143381',
    }
  },
  components: {},
  methods: {
    phoneContact(tel) {
      window.location.href = `tel:${tel}`
    },

    doCopy: function () {
      this.$copyText(this.phone).then(
        function (e) {
          Toast('复制成功, 将联系方式粘贴到手机电话即可联系，或粘贴添加微信。')
        },
        function (e) {
          Toast('复制可能出错了，请拨打电话吧！')
        }
      )
    },
  }
}
</script>

<style scoped>
.title {
  /*height: 300px;*/
  width: 300px;
  text-align: left;
  font-size: 18px;
  margin: 20px auto 0;
}
</style>
